package com.mika.music.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface ListenMapper {

    @Insert("insert into listen(user_id, music_id) values (#{userId}, #{musicId})")
    Integer addListenRecord(Integer userId, Integer musicId);

    @Delete("delete from listen where music_id = #{musicId}")
    Integer deleteListenRecordByMusicId(Integer musicId);
}
